import jnunes.stickytest.model.Customer;
import jnunes.stickytest.repository.CustomerRepository;
import jnunes.stickytest.service.CustomerService;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;


public class Application {

	public static void main(String[] args) {
		
		ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
		
		CustomerService customerService = applicationContext.getBean("customerService", CustomerService.class);
		
		Customer customer = customerService.findAll().get(0);
		
		System.out.println(customer.getFirstname() + " " + customer.getLastname());

	}

}
